﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PodcastToMP3
{
    public class Mp4 : System.IO.FileStream, IAtom
    {
        public Mp4(string filePath) : base(filePath, System.IO.FileMode.Open) { }

        public IEnumerator<IAtom> GetEnumerator()
        {
            return new Mp4IEnumerator(this, this, 0, this.Length);
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return GetEnumerator();
        }

        public long Start { get { return 0; } }

        public long End { get { return base.Length; } }

        public long Lenght { get { return End - Start; } }

        public System.IO.Stream BaseStream { get { return this; } }

        public IAtom Parent { get { return null; } }
    }
}
